package com.english.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 学生班级课时表
 *
 * @author wlq
 * @since 2025-08-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("student_class_hours")
public class StudentClassHours implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 学生ID
     */
    @TableField("student_id")
    private Long studentId;

    /**
     * 班级ID
     */
    @TableField("class_id")
    private Long classId;

    /**
     * 总课时数
     */
    @TableField("total_hours")
    private Integer totalHours;

    /**
     * 已使用课时
     */
    @TableField("used_hours")
    private Integer usedHours;

    /**
     * 剩余课时
     */
    @TableField("remaining_hours")
    private Integer remainingHours;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    // 关联信息（非数据库字段）
    @TableField(exist = false)
    private String studentName;

    @TableField(exist = false)
    private String className;

    @TableField(exist = false)
    private String classType;
} 